#include <stdio.h>
#include "token.h"
#include "lex.h"

int token2;
char token2s[MAX_STRING_LENGTH];

int main()
{
    int token;
    iniciaLex();
    while( ( token = nextToken() ) != T_UNKNOWN && token != T_EOF )
    {
        printf("%d\t", token);
        if( token == T_ID || token == T_BOOL || token == T_INTEGER ) printf("%d", token2);
        if( token == T_STRING ) printf("%s", token2s);
        printf("\n");
    }
    if( token == T_UNKNOWN ) printf("Erro: token invalido\n");
    return 0;
}
